﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class AccountRegisterStep2 : System.Web.UI.Page
{

    protected void Page_Load(object sender, EventArgs e)
    {
        

        //Login
        //Password
        //PasswordConfirm
        //Email

        //Name
        //LastName
        //Patronymic
        //Sex
        //BirthDate
        //City
        //TimeZone

        //Facebook
        //Myspace
        //Vk
        //Twitter
        //GooglePlus
        //ICQ
        //TelNumber
        //OtherContacts
    }

    protected void RegButton_Click(object sender, EventArgs e)
    {
        //проверка совпадения пароля и его повторения не сделана!
        Util.User man = new Util.User();
        
        man.LastName = LastName.Text;
        man.Patronymic = Patronymic.Text;
        man.Sex = Sex.Text;
        man.BirthDate = BirthDate.Text;
        man.City = City.Text;
        man.TimeZone = TimeZone.Text;

        Util.ContactInformation contInfo = new Util.ContactInformation();
        contInfo.PublicEmail = PublicEmail.Text;
        contInfo.Facebook = Facebook.Text;
        contInfo.Myspace = Myspace.Text;
        contInfo.Vk = Vk.Text;
        contInfo.Twitter = Twitter.Text;
        contInfo.GooglePlus = GooglePlus.Text;
        contInfo.ICQ = ICQ.Text;
        contInfo.TelNumber = TelNumber.Text;
        contInfo.OtherContacts = OtherContacts.Text;

        man.ContInfo = contInfo;

        new BLL.AcoolaMemberShip().SetAdditionalInformationUser(man);

        //if (new BLL.AcoolaMemberShip().SetAdditionalInformationUser(man))
        //    Login.Text = "fff";
        //else
        //    Login.Text = "no!!!";
    }
}
